﻿<metro:MetroWindow x:Class="TV_Organizer.StringListEditionWindow"
                   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                   xmlns:metro="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro" Title="Edit List"
                   Width="300" SizeToContent="Height" WindowStartupLocation="CenterScreen">
  <metro:MetroWindow.Resources>
    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.AnimatedSingleRowTabControl.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Icons/MergedResources.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />
        <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
      </ResourceDictionary.MergedDictionaries>

      <DataTemplate x:Key="ItemTemplate">
        <StackPanel Orientation="Horizontal">
          <Button Name="DeleteValueButton" Margin="2" Click="DeleteValueButton_Click" Content="X" Style="{DynamicResource SquareButtonStyle}" />
          <TextBlock VerticalAlignment="Center" Text="{Binding}" />
        </StackPanel>
      </DataTemplate>
    </ResourceDictionary>
  </metro:MetroWindow.Resources>

  <Grid>
    <StackPanel>
      <ListBox Height="500" VerticalAlignment="Stretch" BorderThickness="0" ItemsSource="{Binding List}" ItemTemplate="{StaticResource ItemTemplate}" />
      <Button Name="AddValueButton" Margin="5" HorizontalAlignment="Center" Click="AddValueButton_Click">Add value</Button>

      <UniformGrid>
        <Button Name="ApplyButton" Margin="5" HorizontalAlignment="Center" Click="ApplyButton_Click" IsDefault="True">Apply</Button>
        <Button Name="CancelButton" Margin="5" HorizontalAlignment="Center" Click="CancelButton_Click" IsCancel="True">Cancel</Button>
      </UniformGrid>
    </StackPanel>
  </Grid>
</metro:MetroWindow>
